<include file="Public/head" />
<style type="text/css">
    .car_info{margin:10px 20px;}
    .car_info .car_no{width:100%;height:25px;margin-bottom:10px;}
    .car_info table tr td{height:30px;text-align:left;font-size:12px;padding-left:10px;}
    .clear{clear:both;}
</style>
</head>
<include file="Public/common_header" />
<div class="mian">
<include file="Public/sidebar" menu="cxtj.clcx" />
    <div class="mianR">
        <div class="yuyue">
            <ul>
                <li class="yuCurrent">基本信息</li>
                <li>车辆状态跟踪</li>
                <li id="history">历史检测报告</li>
            </ul>
        </div>
        <div class='listBox'>
            <div class="yuList" >
<!--                <h3 class='cha'>基本信息</h3>-->
                <div class='car_info'>
                    <div class='car_no'><span style="font-size:14px;">车辆编号：<b>{$car_info.sno}</b></span></div>
                    <table border='1' width='100%'>
                         <tbody>
                            <td colspan='4' style="background-color:#c1c1c1;font-size:14px;"><span>车主信息</span></td>
                            <tr>
                                <td width="11%" style="color:#898b8a;">车主类型</td>
                                <td width="39%">{$owner.owner_type_name}</td>
                                <if condition="$owner.owner_type eq 1">
                                    <td width="11%" style="color:#898b8a;">车主姓名</td>
                                    <td width="39%">{$owner.seller_name}</td>
                                    <else />
                                    <td width="11%" style="color:#898b8a;">公司名称</td>
                                    <td width="39%">{$owner.seller_name}</td>
                                </if>
                            </tr>
                            <tr>
                                <if condition="$owner.owner_type eq 1">
                                    <td width="11%" style="color:#898b8a;">联系电话</td>
                                    <td colspan="3">{$owner.phone}</td>
                                    <else />
                                    <td width="11%" style="color:#898b8a;">联系人姓名</td>
                                    <td width="39%">{$owner.contact_person}</td>
                                    <td width="11%" style="color:#898b8a;">联系电话</td>
                                    <td width="39%">{$owner.phone}</td>
                                </if>
                            </tr>
                         </tbody>
                    </table>
                    <table border='1' width='100%' style="margin-top:20px;">
                         <tbody>
                            <tr  style="background-color:#c1c1c1;font-size:14px;">
                                <td colspan='4'><span>车辆信息</span></td>
                                <!--<td>
                                    <a href="/Car/report/car_id/{$car_info.car_id}" target="_blank">
                                        <span style="float:right;padding-right: 10%;color:#20ab4f;">检测报告</span>
                                    </a>
                                </td>-->
                            </tr>
                            <tr>
                                <td width="11%" style="color:#898b8a;">车型</td>
                                <td width="39%">{$car_info.model}</td>
                                <td width="11%" style="color:#898b8a;">排放标准</td>
                                <td width="39%">{$car_info.mession}</td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">初登日期</td>
                                <td>{$car_info.first_reg_date}</td>
                                <td style="color:#898b8a;">颜色</td>
                                <td>{$car_info.color}</td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">表显里程</td>
                                <td>{$car_info.pointer_mileage}</td>
                                <td style="color:#898b8a;">车况级别</td>
                                <td>{$car_info.car_level}</td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">车辆注册地</td>
                                <td>{$car_info.reg_city}</td>
                                <td style="color:#898b8a;">车架号</td>
                                <td>{$car_info.car_vin}</td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">车牌号</td>
                                <td>{$car_info.car_plate_number}</td>
                                <php>$transfer_type = array('1'=>'必须过本地','2'=>'必须过外户','3'=>'不限制');</php>
                                <td style="color:#898b8a;">过户限制</td>
                                <td>{$transfer_type[$car_info['transfer_limit']]}</td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">渠道来源</td>
                                <td>
                                    <if condition="$car_info.comefrom neq ''">
                                    <?php if(empty($car_info['comefrom_url'])):?>
                                      <?php echo $show_from[$car_info['comefrom']];?>
                                    <?php else: ?>
                                      <a href="{$car_info.comefrom_url}" target="_blank" rel="noreferrer"><?php echo $show_from[$car_info['comefrom']];?></a>
                                    <?php endif;?>
                                  <else/>
                                      未知
                                  </if>
                                </td>
                                <td style="color:#898b8a;">所在地</td>
                                <td>{$car_info.location_area}</td>
                            </tr>
                         </tbody>
                    </table> 

                     <php>$order_type = array('0'=>'顺序拍','1'=>'定时拍')</php>
                     <volist name="order_list" id="ol">
                         <if condition="$ol.is_other_channel_deal eq 1">
                             <div class='car_no' style="margin-top:20px;"><span style="font-size:14px;" >订单编号：<b>{$ol.order_no}</b></span></div>
                             <table border='1' width='100%'>
                                 <tbody>
                                 <tr>
                                     <td colspan='3' style="background-color:#c1c1c1;font-size:14px;">
                                         <span>订单信息</span>
                                     </td>
                                     <td style="background-color:#c1c1c1;font-size:14px;">
                                         <a href="/Car/report/car_id/{$ol.car_id}" target="_blank">
                                             <span style="float:right;padding-right: 10%;color:#20ab4f;">检测报告</span>
                                         </a>
                                     </td>
                                 <tr>
                                     <td width="11%" style="color:#898b8a;">订单价格</td>
                                     <td width="39%">{$ol.order_amount}</td>
                                     <td width="11%" style="color:#898b8a;">收款单号</td>
                                     <td width="39%">{$ol.collection_no}</td>
                                 </tr>
                                 <tr>
                                     <td width="11%" style="color:#898b8a;">交易佣金</td>
                                     <td width="39%">{$ol.transfer_fee}</td>
                                     <td width="11%" style="color:#898b8a;">采购单号</td>
                                     <td width="39%">{$ol.purchase_order_nu}</td>
                                 </tr>
                                 <tr>
                                     <td width="11%" style="color:#898b8a;">订单生成时间</td>
                                     <td colspan="3" width="89%">{$ol.create_time}</td>
                                 </tr>
                                 </tbody>
                             </table>
                         <else/>
                             <div class='car_no' style="margin-top:20px;"><span style="font-size:14px;" >拍卖单号：<b>{$ol.order_no}</b></span></div>
                             <table border='1' width='100%'>
                                 <tbody>
                                 <tr>
                                     <td colspan='3' style="background-color:#c1c1c1;font-size:14px;">
                                         <span>拍单信息</span>
                                     </td>
                                     <td style="background-color:#c1c1c1;font-size:14px;">
                                         <a href="/Car/report/car_id/{$ol.car_id}" target="_blank">
                                             <span style="float:right;padding-right: 10%;color:#20ab4f;">检测报告</span>
                                         </a>
                                     </td>
                                 <tr>
                                     <td width="11%" style="color:#898b8a;">上拍场次</td>
                                     <td width="39%">{$ol.scene_name}</td>
                                     <td width="11%" style="color:#898b8a;">竞拍方式</td>
                                     <td width="39%">{$order_type[$ol['is_timing_order']]}</td>
                                 </tr>
                                 <tr>
                                     <td style="color:#898b8a;">竞拍时长</td>
                                     <td>{$ol.est_elapsed_time}</td>
                                     <td style="color:#898b8a;">竞拍开始时间</td>
                                     <td>{$ol.bidding_start_time}</td>
                                 </tr>
                                 <tr>
                                     <td style="color:#898b8a;">起拍价</td>
                                     <td>{$ol.bid_start_price}</td>
                                     <td style="color:#898b8a;">竞拍结束时间</td>
                                     <td>{$ol.bidding_end_time}</td>
                                 </tr>
                                 <tr>
                                     <td style="color:#898b8a;">建议价</td>
                                     <td>{$car_info.suggest_min_price} - {$car_info.suggest_max_price}</td>
                                     <td style="color:#898b8a;">可用代金券</td>
                                     <td>{$ol.coupon}</td>
                                 </tr>
                                 <tr>

                                     <td style="color:#898b8a;">保留价</td>
                                     <td>
                                         {$ol.reserve_price}
                                         <if condition="$ol.show_reserve_price eq 1">
                                             <img src="{:get_style_cdnurl()}paimai/yunying/images/eye.png">
                                         </if>
                                     </td>
                                     <td style="color:#898b8a;">交易服务费</td>
                                     <td>{$ol.commision}</td>
                                 </tr>
                                 <tr>
                                     <td style="color:#898b8a;">拍卖最高价</td>
                                     <td>{$ol.bidding_best_price}</td>
                                     <td style="color:#898b8a;">交付服务费</td>
                                     <td>{$ol.transfer_fee}</td>
                                 </tr>
                                 </tbody>
                             </table>
                         </if>

                    </volist>
                </div>
            </div>
            <php>$car_status_arr = array('0'=>'待上传协议','1'=>'待审核','2'=>'审核失败','3'=>'审核驳回','4'=>'待拍卖','5'=>'拍卖中','6'=>'流拍','7'=>'待重拍','8'=>'交易失败','9'=>'交易成功','10'=>'待检测','11'=>'已退车')</php>
            <div class="yuList" style='display:none'>
                <h3 class="yonghu" style="margin-top:25px;">车辆状态跟踪</h3>
                <div class="yonghuText">
                    <h2>车辆编号：{$car_info.sno}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        {$car_info.reg_city} - {$car_info.model}  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        当前状态：{$car_status_arr[$car_info['car_status']]}
                    </h2>
                    <ul>
                        <li class="clearfix" style="border-bottom:1px solid #ececec;font-weight:bolder;">
                            <em>发生时间</em>
                            <em>执行操作</em>
                            <em>操作人</em>
                        </li>
                        <volist name="car_action_log" id="cl">
                            <li class="clearfix">
                                <em>{$cl.createtime}</em>
                                <em>{$cl.action_name}</em>
                                <em>{$cl.emp_name}</em>
                            </li>
                        </volist>
                    </ul>
                </div>
            </div>
            <div class="yuList" style='display:none'>
                <!--                <h3 class='cha'>基本信息</h3>-->
                <if condition="$total_car  gt '1' ">
                    <div class="presentation">
                        <span><a class="leftBtn"></a><a class="rightBtn"></a></span>
                        <div>
                            <ul class="clearfix">
                                <foreach name="car_id_list" item="car_item" key="key">
                                    <if condition="$key eq 0">
                                        <li name="{$car_item.car_id}" data-url="/Car/reportWithoutHeader/car_id/{$car_item.car_id}" class= "cuurent">报告<?php echo $total_car - $key;?></li>
                                    <else/>
                                        <li name="{$car_item.car_id}" data-url="/Car/reportWithoutHeader/car_id/{$car_item.car_id}">报告<?php echo $total_car - $key;?></li>
                                    </if>

                                </foreach>
                            </ul>
                        </div>
                    </div>
                </if>
                <div class="presentation-cont">
                    <iframe  frameborder="0" scrolling="no" id="external-frame" width="100%" height="3500"
                             src="/Car/reportWithoutHeader/car_id/{$car_info['car_id']}"></iframe>
                </div>
            </div>
        </div>
        <div class="yongBtn" style='width:170px;'>
            <input type="button"  class="quxiao" onclick="window.close()" value="关闭" />
        </div>
    </div>
</div>
<script type="text/javascript">

//历史报告头部切换
$(function(){
    $(".presentation span").hide();
    var oLiNum=$(".presentation ul li").length;
    var oLiW=$(".presentation ul li").width()*oLiNum;
    var num=0;
    if(oLiW>920){
        $(".presentation span").show();
    }else{
        $(".presentation span").hide();
    }
    $(".presentation span .leftBtn").hide();

    $(".presentation span .rightBtn").click(function(){
        $(".presentation span .leftBtn").show()
        num++;
        $(".presentation ul").animate({
            "marginLeft":-$(".presentation ul li").width()*num+"px"
        });
        var wMin=-(oLiNum-9)*$(".presentation ul li").width();
        if(wMin==-$(".presentation ul li").width()*num){
            $(".presentation span .rightBtn").hide();
        }
    })
    $(".presentation span .leftBtn").click(function(){
        num--;
        $(".presentation ul").animate({
            "marginLeft":-$(".presentation ul li").width()*num+"px"
        });
        $(".presentation span .rightBtn").show();
        if(-$(".presentation ul li").width()*num>=0){
            $(".presentation span .leftBtn").hide();

        }
    })
    $(".presentation ul li").click(function(){
        $(".presentation ul li").removeClass("cuurent");
        $(this).addClass("cuurent");
        var index=$(".presentation ul li").index(this);
        //alert($(this).attr("name"));
        var oUrl=$(this).attr("data-url");
        $("#external-frame").attr("src",oUrl);

        //var car_id = $(this).attr("name");
        $(".presentation-cont .jianCeBox").eq(index).show().siblings().hide();
    })
})


function setMethod(m){
    $("#service_method").val(m);
}

function setStatus(status){
    $("#business_status").val(status);
}

$(".other_remark").blur(function(){    
    $("#reserve_remark").val($(this).val());
});


$(".gencuur").click(function(){
    var str = $(this).children("font").html();
    $("#reserve_remark").val(str);
});
</script>
</body>
</html>